<include file="Public:header"/>
<div class="cat">
<table border="1" bordercolor="#DDDFFF" width="100%" style="border-collapse: collapse" cellpadding="5">
	<tr>
		<td align="right">上级分类：</td>
		<td>
		<select size="1" name="parent">
	       <option value="0">顶级分类</option>

<volist name="place_list" id="place_list">
	<if condition="$place_list.place_id eq $now_place['parent']">
	      <option value="{$place_list.place_id}" selected>{$place_list.fullname}</option>
	<else/>
	      <option value="{$place_list.place_id}">{$place_list.fullname}</option>
	</if>
</volist>
	    </select>　
		</td>
	</tr>
	
	<tr>
		<td align="right">货位名称：</td>
		<td><input type="text" name="place_name" value="{$now_place.place_name}"></td>
	</tr>

</table>
</div>
<input name="place_id" type="text" value="{$now_place.place_id}"  style="display:none">
<div id="save"><input id="change" type="button" value="保存更改"></div>

<script src="__APP__/statics/jquery-1.9.1.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__APP__/statics/css/jNotify.jquery.css" />
<script type="text/javascript" src="__APP__/statics/jNotify.jquery.js"></script>
<script>
$(function(){
    $("#change").click(function(){
	    var place_id=$("[name=place_id]").val();
	    var parent=$("[name=parent]").val();
		var place_name=$("[name=place_name]").val();

         $.ajax({
		     type:"POST",
			 url:"__URL__/save_edit",
			 dataType:"json",
			 data:{'place_name':place_name,'place_id':place_id,'parent':parent},
			 success:function(data){
			     if(data=='1'){
				   jSuccess("<strong>修改成功!</strong>",{VerticalPosition : 'center',HorizontalPosition : 'center'});

				 }else{
				   jError("<strong>修改失败！请重试</strong>",{VerticalPosition : 'center',HorizontalPosition : 'center'});
				 }
			 }
		 })
	})

})
</script>
</body>
</html>